<template>
  <el-container id="app">
    <el-header>
      <div class="header-content">智能代码文档诠释系统</div>
    </el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu>
          <el-menu-item index="1">
            <router-link to="/git-link">Git 链接</router-link>
          </el-menu-item>
          <el-menu-item index="2">
            <router-link to="/download">下载</router-link>
          </el-menu-item>
          <el-menu-item index="3">
            <router-link to="/chat">AI 对话</router-link>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script lang="ts">
import { defineComponent } from 'vue';

export default defineComponent({
  name: 'App',
});
</script>

<style scoped>
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin: 0;
}

/* Styles for the header */
.el-header {
  background-color: #337ab7; /* 蓝色头部背景 */
  color: white;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-content {
  font-size: 1.5rem;
}

/* Styles for the aside section */
.el-aside {
  background-color: #35495e;
}

/* Styles for menu and menu items */
.el-menu {
  padding: 10px;
  background-color: #35495e;
  border-right: none;
}

.el-menu-item {
  color: white; /* 确保字体颜色为白色 */
  background-color: #35495e;
}

/* Ensures router-links inherit white color */
.el-menu-item a {
  color: white !important; /* 强制链接字体颜色为白色 */
  text-decoration: none; /* 移除链接下划线 */
}

/* Change background color on hover for menu items */
.el-menu-item:hover {
  background-color: #2c3e50;
}

/* Ensure the main section takes the remaining space */
.el-main {
  padding: 20px;
  background-color: #f5f5f5;
  flex-grow: 1;
}
</style>